import request from '@/utils/request'

// 查询项目剩余开票额
export function getSurplus(projectId) {
  return request({
    url: '/biz/bizInvoice/getSurplus?projectId='+projectId,
    method: 'get'
  })
}

// 查询项目开票列表
export function listBizInvoice(query) {
  return request({
    url: '/biz/bizInvoice/list',
    method: 'get',
    params: query
  })
}

// 查询项目开票详细
export function getBizInvoice(id) {
  return request({
    url: '/biz/bizInvoice/' + id,
    method: 'get'
  })
}

// 新增项目开票
export function addBizInvoice(data) {
  return request({
    url: '/biz/bizInvoice',
    method: 'post',
    data: data
  })
}

// 修改项目开票
export function updateBizInvoice(data) {
  return request({
    url: '/biz/bizInvoice',
    method: 'put',
    data: data
  })
}

// 删除项目开票
export function delBizInvoice(id) {
  return request({
    url: '/biz/bizInvoice/' + id,
    method: 'delete'
  })
}
